using System;
using System.Collections.Generic;
using System.Text;
using Arere.Core.Data;

namespace Arere.Core
{
    public class User
    {
        UserAdapter adapter;
        private Guid userId;
        private string userName;

        public User(UserAdapter adapter, 
            Guid userId, string userName)
        {
            this.adapter = adapter;
        }

        public Player[] Players
        {
            get { return this.adapter.GetPlayersForUser(this.userId); }
        }

        public bool AddPlayer(Guid playerId)
        {
            return this.adapter.AddPlayerToUser(this.userId, playerId);
        }

        public bool RemovePlayer(Guid playerId)
        {
            return this.adapter.RemovePlayerFromUser(this.userId, playerId);
        }
    }
}
